package UIUtils
{
	import flash.geom.Matrix;
	import flash.geom.Rectangle;

	public class uif_matrix extends Matrix
	{
		public function uif_matrix(a:Number=1, b:Number=0, c:Number=0, d:Number=1, tx:Number=0, ty:Number=0) {
			super(a, b, c, d, tx, ty);
		}
		
		
		public function getScale(): Number {
			var _orect: Rectangle = new Rectangle(-100, 0, 100, 0);
			var _rrect: Rectangle = _orect.clone();
			transformRect(_rrect);
			return _rrect.width / _orect.width;
		}
		
		public function transformRect(rect: Rectangle): Rectangle {
			rect.topLeft = transformPoint(rect.topLeft);
			rect.bottomRight = transformPoint(rect.bottomRight);
			return rect;
		}
	}
}